README

Implementation of "Disentangling Structural Breaks in Factor Models for Macroeconomic Data",
also previously circulated as "Disentangling Structural Breaks in High-dimensional Factor Models."
2025 - June

Follow Example.R to load in relevant libraries, and source in relevant functions in "./functions" folder
This example loads in a cleaned and standardized version of the FREDQD dataset
used. 

Main working function is DFM.Projection, with footprint

Inputs
T x N matrix of standardized data
k_ind = break index
r1 = pre break loadings
r2 = post break loadings

Outputs
DFM.Projection obj, containing
Results of 
Z test for null of no change in factor covariance matrix
W test for null of no change in the factor loadings

Additional quantities such as Ztilde, Wtilde etc can also be accessed within this object

Note that Bonferroni Holm adjustment is automatically conducted to control 
for family wise error rate. 

Running all of the tests is somewhat burdensome across all different no. of 
factors, so this part of the code has been commented, with a sample output for 
a specific no. of factors provided. 
This replicates Table 3 of the paper, sans some slight differences due to 
differing implementations of bandwidths etc across versions of software.

Running all of the tests for the bootstrap confidence intervals is also quite burdensome, 
so this part of the code has been commented. 
Uncommenting this replicates Table 4 of the paper, sans some slight differences due to 
differing implementations of RNG seeds. 


